//
//  DaysTrainingPlanViewModel.m
//  JiZhuiAn
//
//  Created by Easy.Lin on 16/6/27.
//  Copyright © 2016年 Easy. All rights reserved.
//

#import "DaysTrainingPlanViewModel.h"
#import "APIService+Training.h"

@interface DaysTrainingPlanViewModel ()

@property (nonatomic, copy  ) NSArray * trainingProjectArray;
@property (nonatomic, strong) LoadingRACCommand * getTrainingProjectCommand;

@end

@implementation DaysTrainingPlanViewModel

- (void)initialize
{
    @weakify(self);
    self.getTrainingProjectCommand = [[LoadingRACCommand alloc] initWithSignalBlock:^RACSignal *(id input) {
        @strongify(self);
        return [[[APIService shareService] getTrainingprojectWithId:self.trainingIdArray] doNext:^(id x) {
            self.trainingProjectArray = x;
        }];
    }];
}

@end
